package aparicio.mbox.parse;

import static org.junit.Assert.*;

import org.junit.Test;

public class ReceivedIpTestCase {

	@Test
	public void testParseReceivedIp() {
		String file = "test\\aparicio\\mbox\\parse\\mbox_good.mbox";
		MboxFile mbox = new MboxFile(file);
		
		try {
			mbox.parse();
		} catch (Exception e) {
			fail("Failed to correctly parse the emails");
		}
		
		assertEquals(1, mbox.getReceivedIP().size());
		assertEquals("<10.182.75.68>", mbox.getReceivedIP().get(0));
	}
	
}
